package com.itheima;

import java.util.Arrays;

public class ShuZu {
    public static void main(String[] args) {
        int[] arr = {11, 22, 22, 55, 88, 44};
        System.out.println(Arrays.toString(arr));
        System.out.println("---------------------");
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));
        System.out.println("---------------------");
        int index1 = Arrays.binarySearch(arr, 55);
        System.out.println("index1 = " + index1);
        int index2 = Arrays.binarySearch(arr, 99);
        System.out.println("index2 = " + index2);
        int index3 = Arrays.binarySearch(arr, 22);
        System.out.println("index3 = " + index3);
    }
}
